//
//  AViewController.m
//  demo12-12
//
//  Created by king on 2017/12/13.
//  Copyright © 2017年 KC. All rights reserved.
//

#import "KCKit.h"
#import "AViewController.h"
#import "Person.h"

KC_DUMMY_CLASS(KCAModel)

#define IOS(IOS_VERSON) @available(iOS IOS_VERSON,*)

@interface AViewController ()

@property (nonatomic,strong)KCAModel *model;

@end

@implementation AViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    if (IOS(11)) {
        self.view.backgroundColor = [UIColor colorNamed:@"ColorA"];
    }else{
        self.view.backgroundColor = [UIColor lightGrayColor];
    }
    
    
    Person *per = [[Person alloc]init];
    
    __weak typeof (per) weakPerson = per;
    
    per.personBlock = ^{

        KCAModel *model = [[KCAModel alloc]init];
        self.model = model;
        
        weakPerson.personBlock = ^{
            
            KCAModel *model = [[KCAModel alloc]init];
            self.model = model;
        
        };
        
    };
    
    per.personBlock();
    

    
    
    
    
}

- (void)dealloc {
    NSLog(@"♻️ Dealloc %@", NSStringFromClass([self class]));
}


@end
